<template>
	<view>
		<view class="forum">

			<view class="under">

				<view class="card">
					<forumCard></forumCard>
				</view>

				<uni-fab ref="fab" horizontal='right' vertical='bottom' @fabClick="to()" />
			</view>

		</view>
		<!-- 自定义导航栏 -->
		<u-tabbar :value="value" :fixed="true" :placeholder="true" :safeAreaInsetBottom="true">
			<u-tabbar-item text="论坛" icon="home" @click="toIndex"></u-tabbar-item>
			<u-tabbar-item text="商品" icon="bag" @click="toGoods"></u-tabbar-item>
			<u-tabbar-item text="我的" icon="account" @click="toMy"></u-tabbar-item>
		</u-tabbar>
	</view>
</template>

<script>
	import forumCard from '@/pages/forum/components/forum-card.vue'
	export default {
		components: {
			forumCard
		},
		data() {
			return {
				imageStyles: {
					width: 100,
					height: 100,
					border: {
						radius: '50%'
					}
				},
				value: 0,
			}
		},
		methods: {
			toGoods() {
				uni.reLaunch({
					url: '/pages/merchant/merchant-goods/merchant-goods'
				})
			},
			toMy() {
				uni.reLaunch({
					url: '/pages/merchant/merchant_about/merchant_about'
				})
			},
			to() {
				// uni.switchTab({url: '/pages/index/index'})
				uni.navigateTo({
					url: '/pages/forum/forum-add/forum-add'
				})
			},
			detail(item) {
				console.log(item)
			}
		}
	}
</script>
</script>

<style lang="scss" scoped>
	.example-body {
		padding: 10px;
		padding-top: 0;
	}

	.top {
		height: 10vw;
		display: flex;
		flex-direction: row;
		justify-content: space-between;

		view {
			width: 50%;
			height: 10vw;
			border: 1rpx solid black;
		}
	}

	.card {
		margin-bottom: 10rpx;
		// background-color: blanchedalmond;
	}
</style>